package com.rs.service;

import com.rs.dao.UploadDao;
import com.rs.entities.UploadPicture;

import net.sf.json.JSONObject;

public class UploadService {

	private UploadDao uploadDao;

	public void setUploadDao(UploadDao uploadDao) {
		this.uploadDao = uploadDao;
	}

	public String savePic(String data, String fileName) {
		UploadPicture uploadPicture = (UploadPicture) JSONObject.toBean(JSONObject.fromObject(data),
				UploadPicture.class);
		return uploadDao.savaThiefPic(uploadPicture, fileName);
	}
}
